/*
* jlb
*/
package com.jlb.user.entity;

/**
 * 矿机挖金兰宝记录 的实体类的状态
 * 状态：挖掘中 Dig_In，以挖出 Dig_Out
 *
 * @author jlb
 */
public enum UserMinerWorkRecordState implements java.io.Serializable {
    Dig_In("挖掘中"),
    Dig_Out("已挖出"),
    Recorded("已入账"),
    Init("初始化"),
    ;

    public String val;

    UserMinerWorkRecordState(String val) {
        this.val = val;
    }

    /**
     * 根据状态名称查询状态
     *
     * @param stateName
     * @return
     */
    public static UserMinerWorkRecordState getEnum(String stateName) {
        for (UserMinerWorkRecordState userMinerWorkRecordState : UserMinerWorkRecordState.values()) {
            if (userMinerWorkRecordState.name().equalsIgnoreCase(stateName)) {
                return userMinerWorkRecordState;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return this.name();
    }

}
